home *** CD-ROM | disk | FTP | other *** search
/ IRIS Performer 2.2 Friends Demo / SGI IRIS Performer 2.2 Friends Demo.iso / friends / openworlds / tcl / tclui.tcl < prev   
Text File  |  1997-11-22  |  1KB  |  51 lines

  1.  
  2. proc owTcluiInit {} {
  3.     makeTcluiWindow .
  4. }
  5.  
  6. proc makeTcluiWindow { parentPath } {
  7.     global owTclui
  8.     global owfilename
  9.  
  10.  
  11.     if [regexp -- {\.$} $parentPath] {
  12.         set parentPath ""
  13.     }
  14.     set owfilename [entry $parentPath.blah]
  15.     pack $parentPath.blah -side left
  16.        
  17.     set owTclui(entry) $parentPath.blah 
  18.     $owTclui(entry) configure -width 40 
  19.     bind $owTclui(entry) <KeyPress-Return> { owLoadURL [$owTclui(entry) get] }
  20.  
  21.     button $parentPath.go -text "New URL" \
  22.         -command { owLoadURL [$owTclui(entry) get] }
  23.     pack $parentPath.go  -side left
  24.  
  25.     button $parentPath.add -text "Add URL" \
  26.         -command { owAddURL [$owTclui(entry) get] }
  27.     pack $parentPath.add -side left
  28.  
  29.     button $parentPath.sa -text "Save" \
  30.         -command { owSave [ $owTclui(entry) get] }
  31.     pack $parentPath.sa  -side left
  32.  
  33.     button $parentPath.nv -text "Next View" \
  34.         -command { owNextView [$owTclui(entry) get] }
  35.     pack $parentPath.nv  -side left
  36.  
  37.     button $parentPath.rst -text "Reset" \
  38.         -command owReset 
  39.     pack $parentPath.rst  -side left
  40.  
  41.     button $parentPath.quit -text "Quit" -command owQuit
  42.     pack $parentPath.quit -side top
  43.  
  44. }
  45.  
  46. proc addToHistory { file } {
  47.     global owfilename
  48.     $owfilename addhistory $file
  49. }
  50. #owTcluiInit 
  51.